package com.wzdigit.wms.wms.service.core.task;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wzdigit.wms.basic.domain.task.TaskSchedulingDeal;
import com.wzdigit.wms.basic.mapper.core.task.TaskSchedulingDealMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * wms定时调度任务处理表 服务类
 * </p>
 *
 * @author 
 * @since 2021-04-27
 */
@Service
@Slf4j
public class TaskSchedulingDealCodeService {
	
	@Autowired
	private TaskSchedulingDealMapper taskSchedulingDealMapper;

	/**
	 * 根据调度枚举获取调度任务（启用）
	 * 
	 * @param taskTypeEnum
	 * @return
	 */
	public TaskSchedulingDeal getOneByTaskSchedulingId(Integer taskSchedulingId) {
		QueryWrapper<TaskSchedulingDeal> queryWrapper = new QueryWrapper<>();
		queryWrapper.eq("TASK_SCHEDULING_ID", taskSchedulingId);
		return taskSchedulingDealMapper.selectOne(queryWrapper);
	}
}
